import React, { Suspense } from 'react';
import ReactDOM from 'react-dom/client';
// 导入路由
import { RouterProvider } from 'react-router-dom'
//导入路由表
import router from './router'

//全局配置  redux
import { Provider } from 'react-redux'
//导入 store
import store from './store'


const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
  <React.StrictMode>
    {/* 利用routerprovide */}
    {/* 利用Provider */}
    <Provider store={store}>
      <Suspense fallback={<div>Loding......</div>}>
        <RouterProvider router={router}></RouterProvider>
      </Suspense>
    </Provider>
  </React.StrictMode>
);

